<?php
declare (strict_types = 1);

namespace app\api\controller;
use app\model\BannersModel;
use think\App;

class Banners extends Base {
    private $bannerModel;

    public function __construct(App $app)
    {
        parent::__construct($app);

        $this->bannerModel = new BannersModel();
    }

    /*
     * 获取所有banner
     * */

    public function getList()
    {
        $list = $this->bannerModel->getList();

        $total = $this->bannerModel->getTotal();

        return $this->succData($total,$list);
    }


}
